package com.yzc.service.Impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yzc.execption.ZcException;
import com.yzc.mapper.OrderStatusLogMapper;
import com.yzc.model.entity.ticket_order.OrderStatusLog;
import com.yzc.result.ResultCodeEnum;
import com.yzc.service.OrderLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class OrderLogServiceImpl extends ServiceImpl<OrderStatusLogMapper, OrderStatusLog>
        implements OrderLogService {

    @Autowired
    private OrderStatusLogMapper orderMapper;
    @Override
    public Boolean createOrderLog(OrderStatusLog orderLog) {
        int insert = orderMapper.insert(orderLog);
        if (insert == 0){
            throw new ZcException(ResultCodeEnum.FAIL.getCode(),"创建订单日志失败");
        }
        return true;
    }
}
